//---------------------------------------------------------------------
//  This file is part of the Background Motion solution.
// 
//  Copyright (C) Mindscape (TM).  All rights reserved.
//  http://www.mindscape.co.nz
// 
//  THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//---------------------------------------------------------------------

using System;

namespace Mindscape.BackgroundMotion.Website.Infrastructure
{
  public class CodeViewerLineNumbers
  {
    private int _from;
    private int _to;

    public CodeViewerLineNumbers(int from, int to)
    {
      From = from;
      To = to;
    }

    public int From
    {
      get { return _from; }
      set { _from = value; }
    }

    public int To
    {
      get { return _to; }
      set { _to = value; }
    }
  }

  [AttributeUsage(AttributeTargets.Class, AllowMultiple=true)]
  public class CodeViewerReferenceAttribute : Attribute
  {
    private int _order;
    private string _filename;
    private CodeViewerLineNumbers _lines;
    private string _description;

    public CodeViewerReferenceAttribute(int order, string filename, int lineFrom, int lineTo, string description)
    {
      _order = order;
      _filename = filename;
      _lines = new CodeViewerLineNumbers(lineFrom, lineTo);
      _description = description;
    }

    public string Filename
    {
      get { return _filename; }
      set { _filename = value; }
    }

    public CodeViewerLineNumbers Lines
    {
      get { return _lines; }
      set { _lines = value; }
    }

    public string Description
    {
      get { return _description; }
      set { _description = value; }
    }

    public int Order
    {
      get { return _order; }
      set { _order = value; }
    }
  }
}
